//
//  OneViewController.m
//  JiaoX
//
//  Created by 尹桥印 on 14-10-12.
//  Copyright (c) 2014年 北京娇羞科技有限公司. All rights reserved.
//

#import "OneViewController.h"

@interface OneViewController ()

@end

@implementation OneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"页面2";
    
    
    

    
    UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleDone target:self action:@selector(backback)];
    
//    UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithCustomView:backButton];
    [item setTintColor:[UIColor whiteColor]];
    self.navigationItem.leftBarButtonItem = item;
    
    
//    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
//    //some initialize code here...
//    UIBarButtonItem *barItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];
//    backButton.titleLabel.text = @"s";
//    self.navigationItem.leftBarButtonItem = barItem;
    
}
-(void)backback{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
